package com.art.wisdom.config;

import java.util.ArrayList;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 做测试
 * @author xiezhiwei
 * @email xiezhiwei0314@126.com
 *
 */
@Component
@ConfigurationProperties(prefix="tomact")
@PropertySource("classpath:myConfig.yml")
//@PropertySource(ignoreResourceNotFound = true, value = {"classpath:myConfig.yml"})
public class MyConfig {
	
	/**
	 * 这样模式的访问只能放在默认访问的配置里面 application.yml 才生效
	 */
	private List<Service> services = new ArrayList<Service>();
	
	public List<Service> getServices() {
		return services;
	}

	public void setServices(List<Service> services) {
		this.services = services;
	}
	

	public static class Service{
		
		private String name;
		
		private String port1;
		
		private String path1;


		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getPort1() {
			return port1;
		}

		public void setPort1(String port1) {
			this.port1 = port1;
		}

		public String getPath1() {
			return path1;
		}

		public void setPath1(String path1) {
			this.path1 = path1;
		}
		
	}
	
}
